<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
		<title>{$seo_title}</title>
		<meta name="Keywords" content="{$seo_keywords}">
		<meta name="Description" content="{$seo_description}">
		{include file="book@mobile_public/static" /}
		<link href="__MOBILE__css/book.css" rel="stylesheet" />
	</head>
	<body>
		{include file="book@mobile_public/head_book" /}
		<div id="chapter-content">
			<div id="chapter-page">
				<div class="container-fluid">
					<div class="cp-name">{$chapter.chapter_name}</div>
					<div class="cp-info">
						{if $chapter.charge}
							{// <h2>章节收费</h2> }
							{// 判断会员是否登录 }
							{if $is_member_login}
								{// <h2>会员已登录</h2> }
								{// 判断会员是否已购买 }
								{if $is_chapter_buy}
									{// <h2>会员已购买</h2> }
									{// 已购买则显示章节内容 }
									<div class="cp-content">{$chapter.content}</div>
								{else}
									{// <h2>会员未购买章节 - 显示购买操作</h2> }
									{// 显示购买操作 }
									<div class="cp-option mtb20">
										<h3 class=>这是VIP章节<br />需要订阅后才能阅读</h3>
										<a href="javascript:;" class="chapterBuy" onclick="subscription({$book.id},{$chapter.id})">订阅本章<span>{$chapter.price} {$Think.config.mn_book.read_money_name}</span></a>
										<div class="cio-msg">您的账户余额为 <span>{$member.read_money}</span> {$Think.config.mn_book.read_money_name}</div>
										<div class="cio-autoOrder clearfix"><label><input type="checkbox" onchange="autoSubscription({$book.id}, this.checked)" class="pull-left" {if $is_auto_subscription && !$fc_auto_subscription}checked{/if}> 自动订阅本书</label></div>
									</div>
								{/if}
							{else}
								{// <h2>会员未登录</h2> }
								<div class="cp-login mtb20">需要登录后才能阅读哦<br /><a href="{:url('book/member.Login/index')}">点击登录</a> 或 <a href="{:url('book/member.Register/index')}">注册</a></div>
							{/if}
						{else}
							{// <h2>章节免费</h2> }
							{// 章节不收费则显示章节内容 }
							<div class="cp-content">{$chapter.content}</div>
						{/if}
					</div>
					<div class="chapter-pagenavi">
						<div class="row">
							<div class="col-xs-4"><a href="{$chapter.prev_page.url|default="javascript:;"}">上一页</a></div>
							<div class="col-xs-4"><a href="{:url('book/book/chapterlist',['bid'=>$book.id])}">目录</a></div>
							<div class="col-xs-4"><a href="{$chapter.next_page.url|default="javascript:;"}">下一页</a></div>
						</div>
					</div>
				</div>
			</div>
		</div>
		{include file="book@mobile_public/foot" /}
		<script>
			{// <h2>自动订阅扣款失败，取消本书自动订阅功能，并提示</h2> }
			{if $fc_auto_subscription}
				$(function(){
					layer.msg('您的账户余额不足，已关闭本书自动订阅功能！',{icon: 2,time: 3000});
				});
			{/if}
		</script>
	</body>
</html>